package cn.itsource.zcn.org.service.impl;

import cn.itsource.zcn.org.domain.ShopLog;
import cn.itsource.zcn.org.mapper.ShoplogMapper;
import cn.itsource.zcn.org.service.IShopLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

/**
 * (ShopLog)表服务实现类
 *
 * @author makejava
 * @since 2021-08-17 17:14:09
 */
@Service
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class ShopLogServiceImpl implements IShopLogService {
    @Autowired
    private ShoplogMapper tShoplogMapper;


    /**
     * 新增数据
     *
     * @param tShoplog 实例对象
     */
    @Override
    @Transactional
    public void save(ShopLog tShoplog) {
        tShoplogMapper.save(tShoplog);
    }

    /**
     * 修改数据
     *
     * @param tShoplog 实例对象
     */
    @Override
    @Transactional
    public void update(ShopLog tShoplog) {
        tShoplogMapper.update(tShoplog);
    }

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     */
    @Override
    @Transactional
    public void delete(Integer id) {
        tShoplogMapper.delete(id);
    }

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public ShopLog queryById(Integer id) {
        return tShoplogMapper.queryById(id);
    }

    /**
     * 查询多条数据
     *
     * @return 对象列表
     */
    @Override
    public List<ShopLog> queryAll() {
        return tShoplogMapper.queryAll();
    }


}
